home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.4)
-
- from test.test_support import vereq, TestFailed
- import _symtable
- symbols = _symtable.symtable('def f(x): return x', '?', 'exec')
- vereq(symbols[0].name, 'global')
- []([](_[1]), 1)
-
- def checkfilename(brokencode):
-
- try:
- _symtable.symtable(brokencode, 'spam', 'exec')
- except SyntaxError:
- e = None
- vereq(e.filename, 'spam')
-
- raise TestFailed('no SyntaxError for %r' % (brokencode,))
-
- checkfilename('def f(x): foo)(')
- checkfilename('def f(x): global x')
-